package com.sc.study.sleeproom.domain;

import com.sc.common.annotation.Excel;
import com.sc.common.core.domain.BaseEntity;
import com.sc.study.student.domain.ScStudent;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 寝室人员更换日志 sc_sleep_room_person_change_log
 * 
 * @author sc
 * @date 2022-04-03
 */
public class ScSleepRoomPersonChangeLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    private Long id;

    /** 人员编号 */
    private Long personId;

    /** 寝室人员类型 */
    private Long sleepRoomPersonTypeId;

    /** 旧值寝室编号,若是新增可不填 */
    private Long oldSleepRoomId;

    /** 新值寝室编号,若是删除可不填 */
    private Long newSleepRoomId;

    /** 信息，一般用于表示新增/删除/修改 */
    private String msg;

    /** 更改的时间  */
    private Date changeTime;

    public void setParams(Long personId, Long sleepRoomPersonTypeId, Long oldSleepRoomId, Long newSleepRoomId, String msg){
        this.setMsg(msg);
        this.setPersonId(personId);

        if(oldSleepRoomId != null)
            this.setOldSleepRoomId(oldSleepRoomId);
        if(newSleepRoomId != null)
            this.setNewSleepRoomId(newSleepRoomId);

        this.setSleepRoomPersonTypeId(sleepRoomPersonTypeId);
    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getPersonId() {
        return personId;
    }

    public void setPersonId(Long personId) {
        this.personId = personId;
    }

    public Long getSleepRoomPersonTypeId() {
        return sleepRoomPersonTypeId;
    }

    public void setSleepRoomPersonTypeId(Long sleepRoomPersonTypeId) {
        this.sleepRoomPersonTypeId = sleepRoomPersonTypeId;
    }

    public Long getOldSleepRoomId() {
        return oldSleepRoomId;
    }

    public void setOldSleepRoomId(Long oldSleepRoomId) {
        this.oldSleepRoomId = oldSleepRoomId;
    }

    public Long getNewSleepRoomId() {
        return newSleepRoomId;
    }

    public void setNewSleepRoomId(Long newSleepRoomId) {
        this.newSleepRoomId = newSleepRoomId;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Date getChangeTime() {
        return changeTime;
    }

    public void setChangeTime(Date changeTime) {
        this.changeTime = changeTime;
    }
}
